package com.sa.web.front.action;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.sa.web.bean.PageBean;
import com.sa.web.bean.QaBean;
import com.sa.web.dao.service.QaDao;

public class A1005 extends ActionSupport {
	
	private List<QaBean> qaList;
	
	private PageBean pb;
	
	private QaDao qaDao;
	
	public String init () throws Exception{
		qaList = qaDao.queryQaInfo(1, 5);
		pb = new PageBean();
		pb.setTotleCount(qaDao.queryQaCount());
		pb.setCurrentPage(1);
		return SUCCESS;
	}
	
	public String qaList () throws Exception{
		qaList = qaDao.queryQaInfo(pb.getCurrentPage(), 5);
		return SUCCESS;
	}

	public List<QaBean> getQaList() {
		return qaList;
	}

	public void setQaList(List<QaBean> qaList) {
		this.qaList = qaList;
	}

	public PageBean getPb() {
		return pb;
	}

	public void setPb(PageBean pb) {
		this.pb = pb;
	}

	public QaDao getQaDao() {
		return qaDao;
	}

	public void setQaDao(QaDao qaDao) {
		this.qaDao = qaDao;
	}
}
